﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using kim.Common;
using System.Data;

namespace kim.Web.flf0624.download
{
    partial class List : kim.UI.ManagePage
    {
        protected string StrPage;
        protected int pageSize, pageIndex, typeid, fid;
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                typeid = kim.Common.KIMRequest.GetInt("typeid", 1);
                GetStrPage();
                GetLabl();
            }
        }
        private void GetLabl()
        {
           Label1.Text = "下载中心";
        }

        private void GetStrPage()
        {
            pageIndex = KIMRequest.GetInt("p", 1);
            string strWhere = "typeid=" + typeid;
            string strUrl = "List.aspx?p=__id__&typeid=" + typeid ;
            pageSize = 10;
            pageIndex = KIMRequest.GetInt("p", 1);
            kim.BLL.download_attach bll = new kim.BLL.download_attach();
            int count = SqlDbHelper.GetPageCurrent("download_attach", strWhere);
            using (DataSet dt = bll.GetNewsPager(pageIndex, pageSize, "", "Sort Desc", strWhere))
            {
                rptlist.DataSource = dt;
                rptlist.DataBind();
            }
            StrPage = kim.Common.Utils.OutPageList(pageSize, pageIndex, count, strUrl, 8);
        }

    }
}